For example, there are cases of detecting the relative displacement between two parts constituting a single mechanical device such as a vehicle, and controlling functions of the vehicle based on the detection value. For example, in order to realize an auto-leveling function of headlights of a vehicle, a displacement detection device is attached to the vehicle body. Specifically, the displacement of a rear-wheel axle with respect to the part of the vehicle body where the headlights are attached is detected, and auto-leveling of the headlights is performed based on the displacement detection value. Auto-leveling is a function of adjusting the light axis direction of headlights, so that the light axis of the headlights is not directed upward more than a prescribed range, when the rear-wheel axle enters into the vehicle body.
As an example of functions installed in a vehicle such as an automobile, other than the above-described auto-leveling function, there is a function of detecting the displacement of an object with a displacement detection device and controlling the displacement. Another example is to detect the stroke (displacement) of the brake pedal, and to use the detection value to control the brakes.
For example, a displacement detection device includes a link mechanism having a detection object part fixed to an object whose displacement is to be detected and a fixed part fixed to a part of the mechanical device, and an angle detector for detecting the displacement of the link mechanism as angle displacement. When the detection object part of the link mechanism becomes displaced with respect to the fixed part, the fixed part at one end of the link mechanism rotates according to the displacement. By detecting this rotation angle with the angle detector, the displacement of the detection object part fixed to the displacement detection object is detected.    Patent document 1: Japanese Laid-Open Patent Publication No. 2006-306177
In the above displacement detection device, a ball joint is often used at the joint part between the levers of the link mechanism. By using a ball joint rotatable in three axial directions, it is possible to cancel out the displacement in directions other than the direction parallel to the plane including the rotation direction of the lever.
However, a ball joint is a relatively expensive part, and by using a ball joint, the manufacturing cost of the displacement detection device increases. Furthermore, a ball joint is attached to the lever of the link mechanism with the use of a fixing mechanism such as a bolt and a nut. Thus, the assembling man-hours for the displacement detection device increase, which increases the manufacturing cost of the displacement detection device accordingly.